package com.java.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 课程
 * 
 * @author jl
 * @since 2020-10-07 10:31:35
 */
@Data
@TableName("course")
public class Course implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
    @TableId(type = IdType.INPUT)
    private String id;
	/**
	 * 名称
	 */
    @NotBlank(message = "名称不能为空")
    private String name;
	/**
	 * 概述
	 */
    private String summary;
	/**
	 * 时长|单位秒
	 */
    private Integer time;
	/**
	 * 价格（元）
	 */
    private BigDecimal price;
	/**
	 * 封面
	 */
    private String image;
	/**
	 * 级别|枚举[CourseLevelEnum]：ONE("1", "初级"),TWO("2", "中级"),THREE("3", "高级")
	 */
    private String level;
	/**
	 * 收费|枚举[CourseChargeEnum]：CHARGE("C", "收费"),FREE("F", "免费")
	 */
    private String charge;
	/**
	 * 状态|枚举[CourseStatusEnum]：PUBLISH("P", "发布"),DRAFT("D", "草稿")
	 */
    private String status;
	/**
	 * 报名数
	 */
    private Integer enroll;
	/**
	 * 顺序
	 */
    private Integer sort;
	/**
	 * 创建时间
	 */
    private Date createdAt;
	/**
	 * 修改时间
	 */
    private Date updatedAt;
	/**
	 * 讲师|teacher.id
	 */
    private String teacherId;

	@TableField(exist = false)
    private List<Category> categorys;

}
